package com.example.miaosha.mapper;

import com.example.miaosha.entity.UserPassword;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * Created by lerry_li on 2020/09/22
 */

@Mapper
public interface UserPasswordMapper {

    @Select("SELECT * FROM user_password WHERE user_id = #{id}")
    UserPassword selectByUserId(Integer id);

    @Insert("INSERT INTO user_password (encrypt_password,user_id) " +
            "VALUES (#{encryptPassword},#{userId})")
    int insertSelective(UserPassword record);
}
